<template>
    <div>
        <HeaderIndex title="影院会员卡"></HeaderIndex>
        <div class="imgs"></div>
        <div class="ka" v-for="(v,i) in arr" :key="i" :title1="v.text" :title2="v.data" :title3="v.reactid" :imgurl="v.img" :bckurl="v.bckurl" :style="bck(v)">
            <div class="mark">折扣卡</div>
            <img :src="v.img | fliterImg" alt="" class="card">
            <div class="ka_1">
                <h2>{{v.text}}</h2>
                <p>{{v.data}}</p>
            </div>
            <div class="ka_2">
                <p>不可储值，不可退换</p>
                <span>{{v.reactid}}</span>
            </div>
        </div>
    </div>
</template>

<script>
import getLink from "@/api/getLink.js";
export default {
  props: ["title1", "title2", "title3", "imgurl", "bckurl"],
  data() {
    return {
      arr: []
    };
  },
  mounted() {
    getLink("/my/vip").then(ok => {
      this.arr = ok.data;
    });
  },
  methods: {
    bck(v) {
      return {
        background: "url(" + v.bckurl + ")"
      };
    }
  }
};
</script>

<style scoped>
.imgs {
  width: 100%;
  height: 4.1rem;
  background: url(/img/vip1.jpg);
  background-size: 100%;
}
.ka {
  width: 92%;
  font: 14px/1.5 Arial, Helvetica, sans-serif;
  border-radius: 0.18rem;
  font-family: PingFangSC-Regular;
  color: #fff;
  background-size: 100%;
  margin: 0.3rem auto 0;
  height: 2.92rem;
  background-color: #3474bc;
  position: relative;
}
i {
  font-size: 0.43rem;
  color: #666;
  position: absolute;
  top: 0.52rem;
  left: 1.6rem;
}

.mark {
  position: absolute;
  top: 0;
  right: 0.2rem;
  padding: 0 0.1rem;
  height: 0.48rem;
  line-height: 0.48rem;
  background: url(/img/ZQ3.png);
  background-size: cover;
  text-align: center;
  font-size: 0.24rem;
  color: #fff;
  opacity: 0.8;
}
.card {
  color: #fff;
  border: 0;
  background: none;
  display: inline-block;
  width: 0.62rem;
  height: 0.62rem;
  margin: 0;
  padding: 0.04rem;
  position: absolute;
  left: 23%;
  top: 0.9rem;
  border-radius: 50%;
}
.ka_1 {
  position: absolute;
  left: 35.5%;
  top: 0.8rem;
  width: 62%;
}
.ka_1 > h2 {
  font-size: 0.36rem;
  line-height: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.ka_1 > p {
  font-size: 0.26rem;
  line-height: 0.37rem;
  opacity: 0.8;
}
.ka_2 {
  position: absolute;
  box-sizing: border-box;
  width: 100%;
  height: 0.76rem;
  line-height: 0.76rem;
  padding: 0 0.2rem 0 0.27rem;
  background-color: rgba(0, 0, 0, 0.08);
  bottom: 0;
  font-size: 0.26rem;
  border-radius: 0 0 0.18rem 0.18rem;
}
.ka_2 > p {
  line-height: 0.76rem;
  font-size: 0.26rem;
  float: left;
  padding-left: 0.38rem;
  background: url(/img/ZQ2.png) left 47% no-repeat;
  background-size: 0.3rem;
}
.ka_2 > span {
  line-height: 0.76rem;
  font-size: 0.26rem;
  float: right;
}
</style>
